<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>数组的扩展</title>
</head>
<body>
<script>
    let  cratArr =[
        {
            id:10001,
            price:20,
            num:6
        },
        {
            id:10002,
            price:30,
            num:2
        },
        {
            id:10003,
            price:40,
            num:5
        },
    ];
    let find = cratArr.find(ele=>ele.id==10003);
    console.log(find)
</script>
</body>
</html>